package main

import (
	"os"
	"strconv"
)

func main(){
	filePath := "../2.txt"
	file,_ := os.OpenFile(filePath,os.O_WRONLY|os.O_TRUNC,666)
	str := "I am line,index ";
	index := ""
	for i:=0;i<=4;i++{
		index = strconv.FormatInt(int64(i),10)
		file.WriteString(str + index + "\n")
	}
}
